#list,遍历list数据、list的排序操作
user_id_list=[1,4,7,2,4,9,7,5,9,18]
print(len(user_id_list))
# for i in range(len(user_id_list)):
#     print(user_id_list[i])

for j in user_id_list:
    print(j)


user_id_list.reverse() #list倒序排序
print(user_id_list)


#升序
user_id_list2=[2,4,7,2,4,9,7,5,9,18]
user_id_list2.sort()
print("升序：")
print(user_id_list2)
print("倒序：")
user_id_list2.sort(reverse=True)
print(user_id_list2)